﻿using System.Runtime.Serialization;
using UnityEngine;
using UnityEngine.Scripting;

namespace GMME.Model.Rtm.Result
{
    [DataContract]
    public class SetRtmChannelPlayerPropertiesResult : ErrorResult
    {
        /**
         * 开发者传入的频道Id
         */
        [DataMember(Name = "channelId")]
        [Preserve]
        public string ChannelId { get; set; }


#if UNITY_ANDROID
        internal static SetRtmChannelPlayerPropertiesResult ConvertSetRtmChannelPlayerPropertiesResult(
            AndroidJavaObject javaObject)
        {
            if (javaObject != null)
            {
                SetRtmChannelPlayerPropertiesResult result = new();
                result.ChannelId = javaObject.Call<string>("getChannelId");
                result.Code = javaObject.Call<int>("getCode");
                result.Msg = javaObject.Call<string>("getMsg");
                return result;
            }

            return null;
        }
#endif
    }
}